home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 October
/
EnigmA AMIGA RUN 31 (1998)(G.R. Edizioni)(IT)[!][issue 1998-10].iso
/
earkit
/
chat
/
amarquee
/
examples
/
pascaltest.p
< prev
next >
Wrap
Text File
|
1998-09-22
|
1KB
|
43 lines
Program AmarqueeTest1;
{PCQ Pascal test program that uses amarquee.library. Doesn't do much...}
{just connects and sets a variable, then disconnects.}
{Be sure to link this file with the AMarquee.lib stub library, or it won't link!}
{$I "Include:Exec/Libraries.i"}
{$I "Include:Libraries/AMarquee.i"}
Var
AMarqueeBase : Address;
session : QSessionPtr;
setOpVal : Integer;
freeSessionVal : Integer;
begin
AMarqueeBase := OpenLibrary("amarquee.library", 44);
if AMarqueeBase = nil then begin
writeln('Could not open amarquee.library');
exit(20);
end;
{Connect to localhost}
session := QNewSession("localhost", 2957, "pascal test");
if session = nil then begin
writeln('Could not create connection to localhost/2957');
CloseLibrary(AMarqueeBase);
exit(20);
end;
{Set a variable}
setOpVal := QSetOp(session, "testVal", "just a test", 12);
if setOpVal = 0 then begin
writeln('Warning, QSetOp failed.');
end;
{Close the connection}
freeSessionVal := QFreeSession(session);
{Clean up}
CloseLibrary(AMarqueeBase);
end.